package
{
	import com.fairytask.MMoGame;
	import com.fairytask.engine.GameStage;
	import com.fairytask.engine.debug.DebugWindow;
	import com.fairytask.engine.utils.IO;
	
	import flash.display.Sprite;
	import flash.events.Event;

	/**
	 * 潜移默化 
	 * @author game
	 * 
	 */	
	[SWF(width="1000", height="600", frameRate="60", backgroundColor="#000000")]
	public class LoveInfect extends Sprite
	{
		public function LoveInfect()
		{
			addEventListener(Event.ADDED_TO_STAGE,onAddStage);
		}
		
		/**
		 * 添加到场景处理 
		 * @param event
		 * 
		 */
		protected function onAddStage(event:Event):void
		{
			GameStage.initStage(stage,1000,600,true);
			//设置调试器
			DebugWindow.InitDebug(GameStage.debugLayer);
			DebugWindow.enabled	=	true;
			GameStage.isLocal	=	true;
			if(stage.loaderInfo.url.indexOf("file://")!=-1)
			{
				GameStage.isLocal	=	true;
				DebugWindow.enabled	=	true;
			}
			DebugWindow.DebugCommandFun = onDebug;
			
			IO.traceLog("当前版本:",stage.loaderInfo.parameters["debug"]);
			
			new MMoGame();
		}
		
		private function onDebug(val:String):void
		{
			
		}
	}
}